# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kinit
pkgver=5.73.0
pkgrel=0
pkgdesc="Process launcher to speed up launching KDE applications"
arch="all !armhf"
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-only OR LGPL-3.0-only"
depends_dev="qt5-qtbase-dev libcap-dev kservice-dev kio-dev ki18n-dev kwindowsystem-dev kcrash-dev kconfig-dev"
makedepends="$depends_dev extra-cmake-modules kdoctools-dev"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kinit-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="48a5e7336352ac3e0ca06af32d7fd7c3167fbab9b3c475daa47433bce2aff894f4c6f3d4063dde5b7f4fa222d4db13d753a0bde610e344ee6fffebe2b15c92ee  kinit-5.73.0.tar.xz"
